import configparser
import  os
curpath = os.path.dirname(os.path.realpath(__file__))
cfgpath = os.path.join(curpath,'youyou.ini')
#print(cfgpath)

#创建管理对象
conf=configparser.ConfigParser()
#read ini file
conf.read(cfgpath,encoding='utf-8')
#get all sections
sections = conf.sections()

#print(sections)
items=conf.items('email_163')
for item in items:
    print('{}:{}'.format(item[0],item[1]))
